<!--
Author: W3layouts
Author URL: http://w3layouts.com
License: Creative Commons Attribution 3.0 Unported
License URL: http://creativecommons.org/licenses/by/3.0/
-->
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Glance Design Dashboard an Admin Panel Category Flat Bootstrap Responsive Website Template | Compose mail ::
        w3layouts</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="keywords" content="Glance Design Dashboard Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design"/>
    <script type="application/x-javascript"> addEventListener("load", function () {
        setTimeout(hideURLbar, 0);
    }, false);

    function hideURLbar() {
        window.scrollTo(0, 1);
    } </script>

    <!-- Bootstrap Core CSS -->
    <link th:href="@{/css/bootstrap.css}" rel='stylesheet' type='text/css'/>

    <!-- Custom CSS -->
    <link th:href="@{/css/style.css}" rel='stylesheet' type='text/css'/>

    <!-- font-awesome icons CSS -->
    <link th:href="@{/css/font-awesome.css}" rel='stylesheet' type='text/css'/>
    <!-- //font-awesome icons CSS -->

    <!-- side nav css file -->
    <link th:href="@{/css/SidebarNav.min.css}" rel='stylesheet' type='text/css'/>
    <!-- side nav css file -->

    <!-- js-->
    <script th:src="@{/js/jquery-1.11.1.min.js}"></script>
    <script th:src="@{/js/modernizr.custom.js}"></script>

    <!--webfonts-->
    <link href="//fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i&amp;subset=cyrillic,cyrillic-ext,latin-ext"
          rel="stylesheet">
    <!--//webfonts-->

    <!-- Metis Menu -->
    <script th:src="@{/js/metisMenu.min.js}"></script>
    <script src=""></script>
    <script th:src="@{/js/custom.js}"></script>
    <link th:href="@{/css/custom.css}" rel='stylesheet' type='text/css'/>
    <!--//Metis Menu -->

</head>
<body class="cbp-spmenu-push">
<div class="main-content">
    <div class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1">
        <!--left-fixed -navigation-->
        <aside class="sidebar-left">
            <nav class="navbar navbar-inverse">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".collapse"
                            aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <h1><a class="navbar-brand" th:href="@{/}"><span class="fa fa-area-chart"></span>ONLINE<span
                            class="dashboard_text">Online Judge</span></a></h1>
                </div>
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="sidebar-menu">
                        <li class="header">MAIN NAVIGATION</li>
                        <li class="treeview">
                            <a th:href="@{/}">
                                <i class="fa fa-dashboard"></i> <span>个人中心</span>
                            </a>
                        </li>
                        <li class="treeview">
                            <a th:href="@{/questions/all}">
                                <i class="fa fa-laptop"></i>
                                <span>查看题目</span>
                            </a>
                        </li>
                    </ul>
                </div>
                <!-- /.navbar-collapse -->
            </nav>
        </aside>
    </div>
    <!--left-fixed -navigation-->

    <!-- header-starts -->
    <div class="sticky-header header-section ">
        <div class="header-left">
            <!--toggle button start-->
            <button id="showLeftPush"><i class="fa fa-bars"></i></button>
            <!--toggle button end-->
            <div class="profile_details_left"><!--notifications of menu start -->
                <ul class="nofitications-dropdown">
                    <li class="dropdown head-dpdn">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i
                                class="fa fa-envelope"></i></a>
                    </li>
                </ul>
                <div class="clearfix"></div>
            </div>
            <!--notification menu end -->
            <div class="clearfix"></div>
        </div>
        <div class="header-right">

            <div class="profile_details">
                <ul>
                    <li class="dropdown profile_details_drop">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                            <div class="profile_img">
                                <span class="fa fa-users"> </span>
                                <div class="user-name">
                                    <p th:each="cookie: ${#request.getCookies()}"
                                       th:if="${cookie.getName()} == username" th:text="${cookie.getValue()}">
                                        &nbsp;
                                        <span th:text="${#request.getCookies()}"></span>
                                    </p>
                                    <span th:each="cookie: ${#request.getCookies()}"
                                          th:if="${cookie.getName()} == status" th:switch="${cookie.getValue()}">
                                        <span th:case="0">普通用户</span>
                                        <span th:case="1">管理员</span>
                                        <span th:case="-2">普通用户请注册</span>
                                    </span>
                                </div>
                                <i class="fa fa-angle-down lnr"></i>
                                <i class="fa fa-angle-up lnr"></i>
                                <div class="clearfix"></div>
                            </div>
                        </a>
                        <ul class="dropdown-menu drp-mnu" th:each="cookie: ${#request.getCookies()}"
                            th:if="${cookie.getName() == 'status' && cookie.getValue() == '-2'}">
                            <li><a th:href="@{/login}"><i class="fa fa-sign-in"></i> 登录</a></li>
                            <li><a th:href="@{/register}"><i class="fa fa-registered"></i> 注册</a></li>
                        </ul>
                        <ul class="dropdown-menu drp-mnu" th:each="cookie: ${#request.getCookies()}"
                            th:if="${cookie.getName() == 'status' && cookie.getValue() != '-2'}">
                            <li><a th:href="@{/logout}"><i class="fa fa-sign-out"></i>退出登录</a></li>
                            <li><a th:href="@{/}"><i class="fa fa-user"></i>个人中心</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="clearfix"></div>
    </div>
    <!-- //header-ends -->
    <!-- main content start-->
    <div id="page-wrapper">
        <div class="main-page compose">
            <h2 class="title1">Compose Mail Page</h2>
            <div class="col-md-12 compose-right widget-shadow" style="width: 95%">
                <div class="panel-default">
                    <div class="panel-heading">
                        <span th:text="${question.getTitle()}"></span>
                        <span style="float: right">
                            <a th:href="@{/answers/question/} + ${question.getQid()}">点击查看题解</a>
                        </span>
                    </div>
                    <div class="panel-body">
                        <div class="alert alert-info" style="height: auto" th:text="${question.getDescription()}">
                        </div>
                        <form class="com-mail" th:action="@{/question/judge}" method="post">
                            <input type="hidden" name="qid" th:value="${question.getQid()}">
                            <input type="hidden" name="uid" th:each="cookie :${#request.getCookies()}"
                                   th:if="${cookie.getName().equals('uid')}" th:value="${cookie.getValue()}">
                            <select name="codeType" class="form-control1 control3">
                                <option th:each="codeType: ${codeTypes}" th:value="${codeType}"
                                        th:text="${codeType}"></option>
                            </select>
                            <textarea name="code" rows="6" class="form-control1 control2" placeholder="代码撰写"></textarea>
                            <input type="submit" value="提交答案">
                        </form>
                    </div>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
    <!--footer-->
    <div class="footer">
        <p>&copy; 2018 Glance Design Dashboard. All Rights Reserved | Design by <a href="https://w3layouts.com/"
                                                                                   target="_blank">w3layouts</a></p>
    </div>
    <!--//footer-->
</div>

<!-- side nav js -->
<script th:src="@{/js/SidebarNav.min.js}" type="text/javascript"></script>
<script>
    $('.sidebar-menu').SidebarNav()
</script>
<!-- //side nav js -->

<!-- Classie --><!-- for toggle left push menu script -->
<script th:src="@{/js/classie.js}"></script>
<script>
    var menuLeft = document.getElementById('cbp-spmenu-s1'),
        showLeftPush = document.getElementById('showLeftPush'),
        body = document.body;

    showLeftPush.onclick = function () {
        classie.toggle(this, 'active');
        classie.toggle(body, 'cbp-spmenu-push-toright');
        classie.toggle(menuLeft, 'cbp-spmenu-open');
        disableOther('showLeftPush');
    };

    function disableOther(button) {
        if (button !== 'showLeftPush') {
            classie.toggle(showLeftPush, 'disabled');
        }
    }
</script>
<!-- //Classie --><!-- //for toggle left push menu script -->

<!--scrolling js-->
<script th:src="@{/js/jquery.nicescroll.js}"></script>
<script th:src="@{/js/scripts.js}"></script>
<!--//scrolling js-->

<!-- Bootstrap Core JavaScript -->
<script th:src="@{/js/bootstrap.js}"></script>

</body>
</html>